import { openBuildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
    // 获取菜单列表
    getMenuList: {
        url: '/adminc/v1/resource_manage/p_menu/get_menu_list',
        method: 'get'
    },
    // 新增菜单
    createMenu: {
        url: '/adminc/v1/resource_manage/p_menu/create_menu',
        method: 'post'
    },
    // 编辑菜单
    updateMenu: {
        url: '/adminc/v1/resource_manage/p_menu/update_menu',
        method: 'put'
    },
    // 删除菜单
    deleteMenu: {
        url: '/adminc/v1/resource_manage/p_menu/delete_menu',
        method: 'delete'
    },
    // 获取菜单树列表
    getMenuTree: {
        url: '/adminc/v1/resource_manage/p_menu/get_menu_cate_list',
        method: 'get'
    },
    // 新增菜单树分类
    createMenuTreeClass: {
        url: '/adminc/v1/resource_manage/p_menu/create_menu_cate',
        method: 'post'
    },
    //菜单排序
    updateMenuOrder: {
        url: '/adminc/v1/resource_manage/p_menu/update_menu_order',
        method: 'put'
    },
    // 修改菜单树分类
    updateMenuTreeClass: {
        url: '/adminc/v1/resource_manage/p_menu/update_menu_cate',
        method: 'put'
    },
    // 删除菜单树分类
    deleteMenuTreeClass: {
        url: '/adminc/v1/resource_manage/p_menu/delete_menu_cate',
        method: 'delete'
    }
}

export default openBuildService(settings)